<?php

/**

 * ContactForm class.

 * ContactForm is the data structure for keeping

 * contact form data. It is used by the 'contact' action of 'SiteController'.

 */
class CalculadoraForm extends CFormModel {

    public $barrio;
    public $factorFormaEstructura;
    public $direccion;
    public $dueno;
    public $numcatastral;
    public $areaCatastral;
    public $informeValuacion;
    public $clase;
    public $edad;
    public $calidad;
    public $tipoArea;
    public $factorNivelPlanta;
    public $areaConstruccion;
    public $areaPorche;
    public $areaGaraje;
    public $areaMuro;
    public $altoMuro;
    public $largoMuro;
    public $materialMuro;
    public $techo;
    public $cieloraso;
    public $piso;
    public $baranda;
    public $estructuraEdificioPrincipal;
    public $voladizo;
    public $balcones;
    public $garaje;
    public $finca;
    public $tomo;
    public $folio;
    public $asiento;
    public $areaTerreno;
    public $ctcbi;
    public $cut;
    public $vp;
    public $dn;
    public $tda;
    public $tdac;
    public $cd;
    public $adt;
    public $cct;
    public $cub;
    public $cbue;
    public $ffe;
    public $fae;
    public $fnp;
    public $ctp;
    public $fap;
    public $cup;
    public $ctg;
    public $fag;
    public $cug;
    public $ctm;
    public $cum;
    public $clasePorche;

    /**
     * Declares the validation rules.
     */
    public function rules() {
        return array(
            // Fields are required
            array('dueno,barrio,edad,areaConstruccion,calidad,clase,factorFormaEstructura,factorNivelPlanta,numcatastral,areaCatastral', 'required'),
            array('areaConstruccion,areaPorche,areaGarage,areaMuro,areaCatastral', 'numerical', 'min' => 1, 'tooSmall' => '{attribute} debe ser mayor que {min}m<sup>2</sup>.'),
            array('edad', 'numerical', 'min' => 1, 'max' => 20, 'tooSmall' => '{attribute} mínima debe ser de al menos {min} año.', 'tooBig' => '{attribute} es muy grande (el máximo es {max} años).'),
            array('largoMuro', 'numerical', 'min' => 1, 'tooSmall' => '{attribute} mínima debe ser de al menos {min}m.'),
        );
    }

    /**
     * Declares customized attribute labels.
     * If not declared here, an attribute would have a label that is
     * the same as its name with the first letter in upper case.
     */
    public function attributeLabels() {
        return array(
            'verifyCode' => 'Verification Code',
            'factorFormaEstructura' => 'Factor de forma de la estructura',
            'barrio' => 'Barrio',
            'direccion' => 'Dirección Tradicional',
            'dueno' => 'Dueño',
            'edad' => 'Edad de la Vivienda',
            'numcatastral' => 'N&uacute;mero Catastral',
            'areaCatastral' => '&Aacute;rea Catastral',
            'informeValuacion' => 'Informe de Valuación N&deg;',
            'clase' => 'Clase',
            'calidad' => 'Calidad',
            'tipoArea' => 'Tipo Area',
            'factorNivelPlanta' => 'Factor Nivel de Planta',
            'areaConstruccion' => 'Área de Construcción',
            'areaTerreno' => 'Área de Terreno',
            'techo' => 'Techo',
            'cieloraso' => 'Cielo Razo',
            'piso' => 'Piso',
            'baranda' => 'Baranda',
            'estructuraEdificioPrincipal' => 'Acabado y Estructura del Edificio Principal',
            'voladizo' => 'Porches en Voladizo',
            'balcones' => 'Balcones',
            'garaje' => 'Tipo Garaje',
            'areaMuro' => 'Área Muro',
            'altoMuro' => 'Alto',
            'largoMuro' => 'Longitud',
            'materialMuro' => 'Material Muro',
        );
    }

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

}